//
//  WARTFUPResultCell.swift
//  WiFiFaster
//
//  Created by one on 2023/12/29.
//

import UIKit

class WARTFUPResultCell: UICollectionViewCell {
    override init(frame: CGRect) {
        super.init(frame: frame)
        contentView.addSubview(watf_bgView)
        watf_bgView.addSubview(watf_titleLabel)
        watf_bgView.addSubview(watf_stateView)
        contentView.addSubview(watf_rowView)
        watf_rowView.addSubview(watf_rowLabel)
        watf_bgView.snp.makeConstraints { make in
            make.bottom.left.width.equalToSuperview()
            make.height.equalTo(64)
        }
        watf_stateView.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.size.equalTo(CGSize(width: 108, height: 46))
            make.right.equalToSuperview().offset(-6)
        }
        watf_titleLabel.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.left.equalToSuperview().offset(16)
        }
        watf_rowView.snp.makeConstraints { make in
            make.size.equalTo(CGSize(width: 64, height: 40))
            make.left.top.equalToSuperview()
        }
        watf_rowLabel.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview()
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    //MARK: - watf lazy
    lazy var watf_bgView: UIImageView = {
        let watf_bgView = UIImageView(image: UIImage(named: "watf_result_upCell"))
        return watf_bgView
    }()
    lazy var watf_stateView: UIImageView = {
        let watf_stateView = UIImageView(image: UIImage(named: "watf_result_upComplete"))
        return watf_stateView
    }()
    lazy var watf_rowView: UIImageView = {
        let watf_rowView = UIImageView(image: UIImage(named: "watf_result_upRow"))
        return watf_rowView
    }()
    lazy var watf_titleLabel: UILabel = {
        let watf_titleLabel = UILabel()
        watf_titleLabel.textColor = .white
        watf_titleLabel.font = UIFont.systemFont(ofSize: 14)
        return watf_titleLabel
    }()
    lazy var watf_rowLabel: UILabel = {
        let watf_rowLabel = UILabel()
        watf_rowLabel.textColor = WATFCommon.watf_getHXColorValue(rgb: 0xFF7A00)
        watf_rowLabel.font = UIFont.systemFont(ofSize: 16)
        return watf_rowLabel
    }()
}
